package day4;
import day3.School;
import java.util.*;

/**
 * @author oldliu
 * @since 1.0
 */
public class MapTest5 {
    public static void main(String[] args) {
        Map<School,String> schools=new HashMap<>();
        schools.put(new School("合肥科海","马鞍山路",10,19),"合肥");
        schools.put(new School("合肥一元","职教城",10,6),"合肥");
        schools.put(new School("合肥中职","大东门",5,19),"合肥");
        schools.put(new School("杭州西湖","武林门",10,19),"杭州");
        schools.put(new School("佛山禅城","长江路",10,19),"佛山");
        //value替换，key不变
        schools.put(new School("合肥科海","屯溪路",1,9),"芜湖");
        System.out.println(schools.size());//5
        Set<Map.Entry<School, String>> entries = schools.entrySet();
        for(Map.Entry<School, String> s:entries){
            System.out.println(s.getKey()+"...."+s.getValue());
        }
        //Collection<String> values = schools.values();
        System.out.println("???????????????????");
        String city=schools.remove(new School("佛山禅城",null,0,0));
        System.out.println(city+"被删除了");
    }
}
